import { Result, Button } from 'antd-mobile';
import { Link } from 'umi';
import styles from './index.less';
import { useCallback } from 'react';
import { throttle } from 'lodash';
import { clearJump } from '@/utils/navigator';

export default function () {
  const backHome = useCallback(
    throttle(function () {
      clearJump('/');
    }, 300),
    [],
  );
  return (
    <div className={styles.notFoundContainer}>
      <Result status="warning" title="404" description="页面未找到" />
      <Button onClick={backHome} size="large" color="primary">
        返回首页
      </Button>
    </div>
  );
}
